package test;

import shake.Shake;
import shake.annotation.ApplicationScoepd;
import shake.annotation.Component;
import shake.annotation.Observer;
import shake.event.ShakeEvent;
import shake.init.module.ServletContextModule;

import com.google.inject.Injector;
import com.google.inject.Stage;

@ApplicationScoepd
@Component
public class AAA {

	// @Inject
	// BBB bb;
	//
	// static public interface BBB {
	//
	// }
	//
	// @Component
	// static public class CCC {
	// @Unwrap
	// public BBB get() {
	// return new BBB() {
	// };
	// }
	// }
	//
	public static void main(String[] args) {
		Injector injector = Shake.create(Stage.DEVELOPMENT,
				new ServletContextModule());
		AAA test = injector.getInstance(AAA.class);
		System.out.println(test);
	}

	@Observer(value = ShakeEvent.DESTROY.class)
	public void destory(AAA a) {
		System.out.println("destory ");
	}

}
